<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <div id="app"></div>

    <template id="my-app">
      <!-- 
			用法区别：
				v-show不支持template；
				
			本质区别：当条件为false时
				v-if：其对应的元素压根不会被渲染到DOM中；
				v-show：会设置条件块内的元素行内样式为display: none；
		 -->
      <h2 v-if="isShow">哈哈哈</h2>
      <h2 v-show="isShow">呵呵呵</h2>
    </template>

    <script src="../js/Vue.js"></script>
    <script>
      const app = {
        template: '#my-app',
        data() {
          return {
            message: 'Hello World',
            isShow: false
          }
        }
      }

      Vue.createApp(app).mount('#app')
    </script>
  </body>
</html>
